package com.hoshiicloud.user.mapper.rbac;

import com.hoshiicloud.user.param.rbac.GetChildListParam;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class StoredProcedureMapper {
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	/**
	 * 获取所有相关下级的ID的存储过程 ,根据要查找的父ID,id列名,父id列名,表名获得相关的下级ID数组的字符串,用逗号分隔
	 * 
	 * @return retVal 返回到param中的字段
	 */
	public String getChildListStr(GetChildListParam param) {
		return sqlSessionTemplate.selectOne("GetChildList", param);
	}

}
